print("{0:-^50}".format("开始注册"))
ID=input("id：")
x=0
Email=input("email：")
Pid=input("身份证号（18位纯数字）：")
b="13579"
Name=input("名字：")
if len(ID)<8:
    for i in ID:
        if str.isnumeric(i) or ord("a")<=ord(i)<=ord("z") or i in "_":
            x=x+1
if ".com" in Email and "@" in Email and len(Pid)==18 and str.isnumeric(Pid) and len(Name)<=4 and x==len(ID):
    if Pid[-2:-1] in b:
       print("姓名：",Name,"\nid：",ID,"\nemail:",Email,"\n身份证号：",Pid,"\n性别：男")
        print("{0:-^50}".format("注册成功"))
    else:
        print("姓名：",Name,"\nid：",ID,"\nemail:",Email,"\n身份证号：",Pid,"\n性别：女")
        print("{0:-^50}".format("注册成功"))
else:
    print("格式错误")
    print("{0:-^50}".format("注册失败"))
